package com.changhai.diabetes.model.page;

import java.util.List;

/**
 * @author Andy
 *
 * @param <T>
 */
public interface Page<T> {

	/**
	 * is first page
	 * 
	 * @return
	 */
	boolean isFirstPage();

	/**
	 * is last page
	 * 
	 * @return
	 */
	boolean isLastPage();

	/**
	 * has next page
	 * 
	 * @return
	 */
	boolean hasNextPage();

	/**
	 * has previous page
	 * 
	 * @return
	 */
	boolean hasPreviousPage();

	/**
	 * get the last page number
	 * 
	 * @return
	 */
	int getLastPageNumber();

	/**
	 * get this page's elements
	 * 
	 * @return
	 */
	List<T> getThisPageElements();

	/**
	 * get total number of elements
	 * 
	 * @return
	 */
	int getTotalNumberOfElements();

	/**
	 * get this page first element number
	 * 
	 * @return
	 */
	int getThisPageFirstElementNumber();

	/**
	 * get this page last element number
	 * 
	 * @return
	 */
	int getThisPageLastElementNumber();

	/**
	 * get next page number
	 * 
	 * @return
	 */
	int getNextPageNumber();

	/**
	 * get previous page number
	 * 
	 * @return
	 */
	int getPreviousPageNumber();

	/**
	 * get page size
	 * 
	 * @return
	 */
	int getPageSize();

	/**
	 * get this page number
	 * 
	 * @return
	 */
	int getThisPageNumber();

	String getParametes();
}
